﻿using UnityEngine;
using System.Collections;
/// <summary>
/// 玩家进入该触发器后会禁止摄像机x方向的跟随，这时离目标点很近了
/// </summary>
public class DisableXFollowTrigger : MonoBehaviour
{
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if(collision.CompareTag("Player"))
        {
            Camera.main.GetComponent<CameraController>().ApplyFollowX = false;
        }
    }
}
